﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace TomAndJerryMidnightSnack
{
    class LifeSprite
    {
        public AnimationState LifeAnimation;
        public Vector2 Position;
        public bool Active;
        public int Width
        {
            get { return LifeAnimation.FrameWidth; }
        }
        public int Height
        {
            get { return LifeAnimation.FrameHeight; }
        }

        public void Initialize(AnimationState animation, Vector2 position)
        {
            LifeAnimation = animation;
            Position = position;
            Active = true;
        }

        public void Update(GameTime gameTime)
        {
            LifeAnimation.Position = Position;
            LifeAnimation.Update(gameTime);
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            LifeAnimation.Draw(spriteBatch);
        }
    }
}
